import { BrowserModule } from '@angular/platform-browser';
import { FormsModule } from '@angular/forms';
import { HttpClientModule } from '@angular/common/http';
import { NgModule } from '@angular/core';

import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
import { ListComponent } from './list/list.component';
import { ListItemComponent } from './list/item/item.component';
import { ListdetailComponent } from './listdetail/listdetail.component';
import { Editor } from './listedit/listedit.component';
import { CollectionComponent } from './collection/collection.component';
import {
  FooterComponent,
  HeaderComponent,
  PhonePipe,
  BtnClickDirective
} from './shared';
import {ContactService} from "./service/contact-service.service";
import {UtilService} from "./service/util-service.service";

//加载 组件 服务 指令 管道 模块
@NgModule({
  declarations: [
    AppComponent,
    HeaderComponent,
    FooterComponent,
    PhonePipe,
    BtnClickDirective,
    ListComponent,
    ListdetailComponent,
    Editor,
    CollectionComponent,
    ListItemComponent
  ],
  imports: [//导入模块
    BrowserModule,
    AppRoutingModule,
    FormsModule,
    HttpClientModule,
  ],
  providers: [ContactService, UtilService],//导入服务
  bootstrap: [AppComponent] //启动组件
})
export class AppModule { }
